/* 确保内容可见性 */
body {
    background-color: #fff;
}

main {
    min-height: 100vh;
    padding: 2rem 0;
}

.travel-detail {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 旅行日记容器 */
.travel-detail {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* 旅行日记头部 */
.travel-header {
    margin-bottom: 2rem;
    text-align: center;
}

.travel-title {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.travel-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
}

.meta-item i {
    font-size: 1.25rem;
}

.travel-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag {
    padding: 0.25rem 0.75rem;
    background-color: var(--tag-bg);
    color: var(--tag-color);
    border-radius: 20px;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background-color 0.3s;
}

.tag:hover {
    background-color: var(--tag-bg-hover);
}

/* 旅行日记内容 */
.travel-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin-bottom: 3rem;
}

.travel-text {
    grid-column: 1 / 2;
}

.travel-cover {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
}

.travel-cover img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.travel-section {
    margin-bottom: 3rem;
}

.travel-section h2 {
    font-size: 1.75rem;
    color: var(--heading-color);
    margin-bottom: 1.5rem;
}

.travel-section p {
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

/* 图片画廊 */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* 实用信息 */
.travel-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
}

.info-item h3 {
    font-size: 1.25rem;
    color: var(--heading-color);
    margin-bottom: 1rem;
}

.info-item ul {
    list-style: none;
    padding: 0;
}

.info-item li {
    margin-bottom: 0.75rem;
    color: var(--text-color);
    line-height: 1.6;
}

/* 地图 */
.travel-map {
    margin-top: 3rem;
}

.travel-map h2 {
    font-size: 1.75rem;
    color: var(--heading-color);
    margin-bottom: 1.5rem;
}

#map-container {
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
}

/* 作者信息和分享 */
.travel-footer {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.author-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-text h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    color: var(--heading-color);
}

.author-text p {
    color: var(--text-light);
    line-height: 1.6;
}

.share-section {
    text-align: right;
}

.share-section h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--heading-color);
}

.share-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    background-color: var(--button-bg);
    color: var(--button-text);
    cursor: pointer;
    transition: background-color 0.3s;
}

.share-btn:hover {
    background-color: var(--button-bg-hover);
}

/* 评论区 */
.travel-comments {
    max-width: 800px;
    margin: 3rem auto;
}

.travel-comments h3 {
    font-size: 1.5rem;
    color: var(--heading-color);
    margin-bottom: 1.5rem;
}

.comment-form {
    margin-bottom: 2rem;
}

.comment-form textarea {
    width: 100%;
    height: 120px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    resize: vertical;
    margin-bottom: 1rem;
}

.comment-form button {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.comment-form button:hover {
    background-color: var(--primary-color-dark);
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comment-item {
    display: flex;
    gap: 1rem;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 600;
    color: var(--text-color);
}

.comment-date {
    color: var(--text-light);
    font-size: 0.875rem;
}

.comment-text {
    line-height: 1.6;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.comment-actions {
    display: flex;
    gap: 1rem;
}

.comment-actions button {
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: none;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
}

.comment-actions button:hover {
    background-color: var(--bg-secondary);
    color: var(--text-color);
}

/* 侧边栏 */
.travel-sidebar {
    grid-column: 2 / 3;
}

.widget {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.widget h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--heading-color);
}

.related-travels ul {
    list-style: none;
    padding: 0;
}

.related-travels li {
    margin-bottom: 1.5rem;
}

.related-travels a {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    color: var(--text-color);
}

.related-travels img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.travel-info h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    transition: color 0.3s;
}

.related-travels a:hover h4 {
    color: var(--primary-color);
}

.view-count {
    color: var(--text-light);
    font-size: 0.875rem;
}

.location-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .travel-content {
        grid-template-columns: 1fr;
    }

    .travel-sidebar {
        grid-column: 1 / -1;
    }

    .travel-footer {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .author-info {
        justify-content: center;
    }

    .share-section {
        text-align: center;
    }

    .share-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .travel-title {
        font-size: 2rem;
    }

    .travel-meta {
        flex-direction: column;
        gap: 1rem;
    }

    .travel-info {
        grid-template-columns: 1fr;
    }

    .image-gallery {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .travel-title {
        font-size: 1.75rem;
    }

    .comment-item {
        flex-direction: column;
    }

    .comment-avatar {
        width: 40px;
        height: 40px;
    }

    .related-travels a {
        flex-direction: column;
    }

    .related-travels img {
        width: 100%;
        height: 150px;
    }
}

/* 旅行统计小部件 */
.travel-stats {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    overflow: hidden;
}

.travel-stats h3 {
    font-size: 1.25rem;
    color: var(--heading-color);
    margin-bottom: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background-color: var(--bg-color);
    border-radius: 6px;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* 社交链接小部件 */
.social-links {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    overflow: hidden;
}

.social-links h3 {
    font-size: 1.25rem;
    color: var(--heading-color);
    margin-bottom: 1.5rem;
}

.social-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: var(--bg-color);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.2s, background-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.social-item:hover {
    transform: translateY(-2px);
    background-color: var(--bg-hover);
}

.social-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.social-name {
    font-size: 0.875rem;
    flex-grow: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .social-grid {
        grid-template-columns: 1fr;
    }
} 